import { request } from '@/utils';
import { UserQueryRequest } from './types';

export const uploadBulkImport = (formData: any) => {
  return request.post('/api/user/bulkImport', formData, {
    headers: { 'Content-Type': 'multipart/form-data' }, // 确保正确的Content-Type
  });
};

export const addUser = (formData: any) => {
  return request.post('/api/user/register', formData);
};

export const searchUser = (formData: UserQueryRequest) => {
  return request.post('/api/user/searchUser', formData);
};

export const updateUser = (formData: any) => {
  return request.post('/api/user/ChangeInfo', formData);
};

/** 获取所有老师信息 */
export const getTeacher = () => {
  return request.get('api/course/getTeacher');
};